package com.ones.kit.codegun.controller;

import com.ones.common.core.util.Res;
import com.ones.kit.codegun.util.OnesCodegenUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 代码生成
 *
 * @author Clark
 * @version 2024-11-27
 */
@Slf4j
@RestController
@RequestMapping("/codegun")
public class OnesCodegunController {
    @Autowired
    private OnesCodegenUtils utils;
    /**
     * 代码生成
     *
     * @return Res
     */
    @GetMapping
    public Res codeGenerator() {
        this.utils.codeGenerator();
        log.warn("---------------------代码生成完成---------------------");
        return Res.ok();
    }
}